<template>
	<view>
		<uni-list>
			<uni-list-item v-for="item in data" :key="item" :title="item" showArrow clickable @click="toForm(item)" />
		</uni-list>
		<button v-show="data&&data.length>0" type="primary">保 存</button>
		<uni-popup ref="popup" type="dialog">
			<uni-popup-dialog mode="input" message="成功消息" :duration="2000" :before-close="true" @close="close"
				@confirm="confirm"></uni-popup-dialog>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: [],
				queryParam: {
					"Keyword": "",
					"SupplieId": "",
				},
			}
		},
		onNavigationBarButtonTap(e) {
			console.log(e);
			this.$refs.popup.open()
		},
		onLoad(options) {
			this.queryParam.SupplieId = uni.getStorageSync('CompanyInfo').Id
			this.getDataList()
		},
		methods: {
			getDataList() {
				uni.showLoading()
				this.$http('post', '/Base_Manage/Base_Attribute/GetInventSymbolList?CompanyId=' + this.queryParam
					.SupplieId).then(res => {
					uni.hideLoading()
					if (res.Success) {
						this.data = res.Data
						this.total = res.Total
					} else uni.showToast({
						icon: 'none',
						title: res.Msg
					})
					console.log(this.total);
				})
			},
			toForm(item) {},
			close() {
				this.$refs.popup.close()
			},
			confirm(e) {
				console.log(e);
				return
				this.$refs.popup.close()
			}
		}
	}
</script>

<style>

</style>